# 手机话费计算

ll=eval(input("流量"))
thsj=eval(input("通话时间"))

fee = float(128)
if 33 >= ll > 30:
    fee += (ll - 30) * 5
if ll > 33:
    fee += 15 + (ll - 33) * 3
if thsj > 500:
    fee += 0.15 * (thsj - 500)

print("费用{:.2f}".format(fee))